#include "Entity.h"

Entity::Entity(string modelName, string textureName)
{
	model = new Model3D;
	model->load(modelName, textureName);

	mMat.identity();
}

Entity::~Entity(void)
{
}

void Entity::draw()
{
	glPushMatrix();
	update();
	glMultMatrixf(mMat.getTranspose());

	// at last
	model->render();
	glPopMatrix();
}

void Entity::multiplyMatrix(Matrix4& mat)
{
	mMat = mMat * mat;
}

void Entity::update()
{
	// User should implement update function
}
